
<div id="main-content" class="prepend-1 span-19 last">
	<h3>Riwayat Akademis - <?php echo $student->name; ?></h3>
<?php 
	$current = 0;
	if ($histories == NULL) :
?>
	<span class="info">Tidak ada riwayat akademis mahasiswa.</span>
<?php 
	else :
		foreach ($histories as $history) :
			if ($current != intval($history->term) && $current != 0) :
				echo '</table>';
			endif;
			if ($current != intval($history->term)) :
				$current = $current + 1;
?>
	<h4>Semester <?php echo $current; ?></h4>
	<table>
		<tr>
			<th width="200">Kode Mata Kuliah</th>
			<th>Nama Mata Kuliah</th>
			<th width="150">Presensi</th>
			<th width="150">Nilai Akhir</th>
		</tr>
<?php 
			endif;
?>
		<tr>
			<td align="center"><?php echo $history->id; ?></td>
			<td><?php echo $history->name; ?></td>
			<td align="center"><?php echo $history->presence; ?></td>
			<td align="center"><?php echo $history->grade; ?></td>
		</tr>
<?php 
		endforeach;
	endif; 
?>
	</table>
	<div class="clear"><?php echo nbs(); ?></div>
</div>
